<?php


//create user directories on the pin project



//	/
//	/members
//	->	/members/userData
//	--> /members/userData/<username>/
//	---> /members/userData/<username>/music/
//	---> /members/userData/<username>/pictures/
//	----> /members/userData/<username>/pictures/<album>/
//	----> /members/userData/<username>/pictures/<album>/<picture>
//	---> /members/userData/<username>/videos/
//	---> /members/userData/<username>/games/

require_once "../common/PinSQL.obj";
	
$pinSQL = new PinSQL();

$pinSQL->Query("SELECT username FROM members");

$num = $pinSQL->GetNumRows();

mkdir("userData", 0755);
for ($i = 0; $i < $num; $i++)
{
	$username = $pinSQL->getEntry($i, 'username');
	mkdir("userData/$username", 0755);
	mkdir("userData/$username/music", 0755);
	mkdir("userData/$username/pictures", 0755);
	mkdir("userData/$username/videos", 0755);
	mkdir("userData/$username/games", 0755);
}

$pinSQL->Close();

?>

